<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   MySQL数据库遭到攻击篡改—使用备份和binlog进行数据恢复  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/4825.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466459826: Accept with keywords: (title(0.2):数据恢复,数据库,社区,备份,数盟, topn(0.233333333333):数据恢复,社区,数盟,行程,行业资讯,作者,时间,数据挖掘,数据分析,漓江,朋友,备份,职业规划,基础架构,景点,文章,可视化,日志,数据,脚本,合作伙伴,主库,编程语言,西街,业务,人工智能,字段,时间段,行业,数据库).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    MySQL数据库遭到攻击篡改—使用备份和binlog进行数据恢复
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    MySQL数据库遭到攻击篡改—使用备份和binlog进行数据恢复 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,85] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech/base">
       基础架构
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/4825.html">
          MySQL数据库遭到攻击篡改—使用备份和binlog进行数据恢复
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          1,416 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech/base" rel="category tag">
          基础架构
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <p>
        作者：张正
       </p>
       <p>
        数据篡改即是对计算机网络数据进行修改、增加或删除，造成数据破坏。数据库数据被攻击了首先得查看是被删除了还是被篡改了?是否有备份数据，是否能够进行恢复并加固。本文来自数据库技术专家张正，主要描述了MySQL遭到攻击篡改数据，利用从库的备份和主库的Binlog进行不完全恢复。
       </p>
       <p>
        <b>
         以下是作者原文：
        </b>
       </p>
       <h2>
        一、发现问题
       </h2>
       <p>
        今天是2014-09-26，开发大清早就说昨晚数据库遭到了攻击。数据库中某文章表的文章内容字段遭到篡改，全部改成了同一篇文章。
       </p>
       <p>
        通过查看日制 发现 数据是在 2014-09-25 21:53:57 遭到篡改。
       </p>
       <p>
        所有的内容全部被改成了如下：
       </p>
       <blockquote>
        <p>
         subject: 桂林阳朔自助游
        </p>
        <p>
         content:
        </p>
        <p>
         &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 一直都是自助游，从不喜欢?团。去之前都是在网上做足了功课，真的是很感谢那些写游记写攻略的朋友。所以，现在也想把自己的体会和经验写出来，和大家分享，希望对后来的朋友有帮助。
        </p>
        <p>
         &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 一个月前，朋友约我去阳朔一游，阳朔也是我一直想去的地方，特别是传说中的西街。上网搜集资料，制定出我们的行程计划（呵呵，可能是职业习惯吧，制定计划和行程安排是我们的强项，计划性和灵活性是我们的特点），目的很明确，是度假休闲，不必游走于各个景点，其实我想朋友们也在很多地方都旅游多了，也知道有些景点是怎么出来的，各地都一样。
        </p>
        <p>
         &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 制定好主旋律后，我们的大致行程安排如下：
        </p>
        <p>
         &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 十九号桂林集中，二十号出发去阳朔，先去阳朔安顿下来（有些人是从桂林带着行李在杨堤路口下车，直接先去漓江漂流，然后再去阳朔，好像节约时间，不过，我们因为没有安排那么满，也不想带着行李游玩，所以选择先去阳朔安顿，和客栈老板好好聊聊情况后，再决定具体细节）
        </p>
        <p>
         &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?次度假的主要内容是：漓江漂流；遇龙河漂流（全漂），十里画廊；西街打望，发呆，西街酒吧，印象刘三姐，其他的根据情况和心情临时决定。
        </p>
       </blockquote>
       <p>
        我把文章贴出来，先谴责一下，很可能是某旅游社的人为了打广告 雇人干的。
       </p>
       <h2>
        二、解决方法
       </h2>
       <p>
        这个库我们是每天凌晨备份，保留30天的备份。主库的Binlog保留时间为7天。
       </p>
       <p>
        因此很容易想到的方法是将从库2014-09-25凌晨的备份拿出来恢复，然后通过主库的Binlog通过时间段来筛选出凌晨至2014-09-25 21:53:56的所有更改，之后的数据，经业务确认，可以舍弃掉。或者后面再通过其他方法慢慢将这部分数据找出来。但是当务之急，是立马恢复数据库。
       </p>
       <h2>
        三、找备份及时间点
       </h2>
       <p>
        在备份的从库上检查备份：
       </p>
       <blockquote>
        <p>
         crontab -l
         <br/>
         #0 3 * * * /data/opdir/mysqlbak/backup_mysqldump.sh 6084 &gt;&gt; /data/opdir/mysqlbak/6084/mysql-bakup.log 2&gt;&amp;1
        </p>
       </blockquote>
       <p>
        发现备份任务让注释了
       </p>
       <p>
        查看备份文件：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576866abe7f11652999017" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &amp;lt;p&amp;gt;[root@localhost 6084]# ll&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;total 128&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 25 03:13 20140825&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 26 03:13 20140826&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 27 03:13 20140827&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 28 03:13 20140828&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 29 03:13 20140829&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 30 03:13 20140830&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 31 03:13 20140831&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;1 03:13 20140901&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;2 03:13 20140902&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;3 03:13 20140903&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;4 03:13 20140904&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;5 03:13 20140905&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;6 03:13 20140906&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;7 03:13 20140907&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;8 03:13 20140908&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;9 03:13 20140909&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 10 03:13 20140910&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 11 03:13 20140911&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 12 03:13 20140912&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 13 03:13 20140913&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 14 03:13 20140914&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 15 03:13 20140915&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 16 03:13 20140916&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 17 03:13 20140917&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 18 03:14 20140918&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 19 03:14 20140919&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 20 03:13 20140920&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 21 03:13 20140921&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 22 03:14 20140922&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;drwxr-xr-x 2 root root 4096 Sep 23 18:33 20140923&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-rw-r--r-- 1 root root 5475 Sep 23 18:33 mysql-bakup.log&amp;lt;/p&amp;gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576866abe7f11652999017-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576866abe7f11652999017-1">
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-v">
                root
               </span>
               <span class="crayon-sy">
                @
               </span>
               <span class="crayon-i">
                localhost
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                6084
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-p">
                # ll&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;total 128&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 25 03:13 20140825&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 26 03:13 20140826&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 27 03:13 20140827&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 28 03:13 20140828&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 29 03:13 20140829&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 30 03:13 20140830&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Aug 31 03:13 20140831&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;1 03:13 20140901&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;2 03:13 20140902&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;3 03:13 20140903&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;4 03:13 20140904&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;5 03:13 20140905&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;6 03:13 20140906&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;7 03:13 20140907&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;8 03:13 20140908&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep &amp;amp;nbsp;9 03:13 20140909&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 10 03:13 20140910&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 11 03:13 20140911&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 12 03:13 20140912&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 13 03:13 20140913&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 14 03:13 20140914&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 15 03:13 20140915&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 16 03:13 20140916&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 17 03:13 20140917&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 18 03:14 20140918&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 19 03:14 20140919&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 20 03:13 20140920&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 21 03:13 20140921&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;drwxr-xr-x 2 root root 4096 Sep 22 03:14 20140922&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;drwxr-xr-x 2 root root 4096 Sep 23 18:33 20140923&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-rw-r--r-- 1 root root 5475 Sep 23 18:33 mysql-bakup.log&amp;lt;/p&amp;gt;
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0101 seconds] -->
       <p>
        <b>
         备份只到20140923日，下午18:33分。
        </b>
       </p>
       <p>
        备份日志最后一段截取：
       </p>
       <blockquote>
        <p>
         tail -n 5 mysql-bakup.log
         <br/>
         deleting backup of 30 days ago — 20140824
         <br/>
         2014-09-23
         <b>
          18:19:12 begin backup …
          <br/>
         </b>
         20140824 deleted OK
         <br/>
         2014-09-23
         <b>
          18:33:43 end backup …
         </b>
        </p>
       </blockquote>
       <p>
        因为这些表是在从库备份的，而且表都是MyiSAM的表。查看备份脚本，是先Stop Slave之后，才开始备份，因此从备份脚本输出的日志中找到备份开始的时间是：
       </p>
       <blockquote>
        <p>
         2014-09-23 18:19:12
        </p>
       </blockquote>
       <p>
        通过：
       </p>
       <blockquote>
        <p>
         Drwxr-xr-x 2 root root 4096
         <b>
          Sep 23 18:33
         </b>
         20140923
        </p>
       </blockquote>
       <p>
        可看到结束时间是：
        <b>
         2014-09-23 18:33:00
        </b>
       </p>
       <p>
        现在考虑到底是以备份开始的时间：
        <b>
         2014-09-23 18:19:12
        </b>
        为Start-DateTime还是以
        <b>
         2014-09-23 18:33:00
        </b>
        为Start-DateTime。
       </p>
       <p>
        前面 提到备份脚本是从库进行备份的，是在
        <b>
         2014-09-23 18:19:12
        </b>
        开始的，在这个时刻备份开始，执行了Stop Slave；因此整个备份的状态反映的是
        <strong>
         从库
        </strong>
        <strong>
         2014-09-23 18:19:12 这个时间的状态
        </strong>
        。而且通过监控可以看到在这个时间点，
        <strong>
         从库的延迟为0
        </strong>
        ，因此可以认为这个备份就是
        <strong>
         主库在这个时间的备份
        </strong>
        。
       </p>
       <p>
        <strong>
         NOTES：
        </strong>
        <br/>
        （有人可能会因为从库上有Binlog，从库也会接受主库的Binlog之类的机制而造成混淆。这里要结合我们具体的备份方式和恢复方式来看，以选出正确的时间点。）
       </p>
       <p>
        前面提到通过日志查到遭到篡改的时间为：2014-09-25 21:53:57，因此可以将
        <strong>
         2014-09-25
        </strong>
        <strong>
         21:53:56
        </strong>
        作为Stop-DateTime
       </p>
       <p>
        因此Binlog命令应该是这样：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576866abe7f24975672963" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &amp;lt;strong&amp;gt;mysqlbinlog --database=[db_name] --start-datetime='2014-09-23&amp;amp;nbsp;&amp;lt;/strong&amp;gt;&amp;lt;strong&amp;gt;18:19:12&amp;lt;/strong&amp;gt;&amp;lt;strong&amp;gt;' --stop-datetime='2014-09-25 21:53:56'&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;strong&amp;gt;[binlog_name] &amp;gt; binlog_name0000x.sql&amp;lt;/strong&amp;gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576866abe7f24975672963-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576866abe7f24975672963-1">
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                strong
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                mysqlbinlog
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                database
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-v">
                db_name
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                datetime
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '2014-09-23&amp;amp;nbsp;&amp;lt;/strong&amp;gt;&amp;lt;strong&amp;gt;18:19:12&amp;lt;/strong&amp;gt;&amp;lt;strong&amp;gt;'
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                stop
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                datetime
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '2014-09-25 21:53:56'
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                strong
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                strong
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-v">
                binlog_name
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                binlog_name0000x
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                sql
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                strong
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0061 seconds] -->
       <p>
       </p>
       <h2>
        四、具体的恢复操作
       </h2>
       <p>
        清楚了这些，具体的操作就简单了：
       </p>
       <p>
        1.从备份机拷贝备份：
       </p>
       <blockquote>
        <p>
         SCP&lt;备份机IP&gt;:/data/MySQLbak/20140923/20140923.db_name.gz &lt;恢复测试机IP&gt;:/data/opdir/20140926
        </p>
       </blockquote>
       <p>
        2.恢复测试机 解压：
       </p>
       <blockquote>
        <p>
         gunzip 20140923.db_name.gz
        </p>
       </blockquote>
       <p>
        3.恢复测试机导入(测试恢复库中之前没有db_name这个库)：
       </p>
       <blockquote>
        <p>
         MySQL -uroot -pxxxxxx -S /tmp/MySQL.sock &lt; 20140923.db_name
        </p>
       </blockquote>
       <p>
        4.将主库的Binlog拷贝到恢复测试机：
       </p>
       <p>
        查看主库Binlog
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576866abe7f2c233062839" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          -rw-rw---- 1 MySQL MySQL &amp;amp;nbsp;87669492 Sep 23 00:00 MySQL-bin.000469&amp;lt;br&amp;gt;-rw-rw---- 1 MySQL MySQL 268436559 Sep 23 04:20 MySQL-bin.000470&amp;lt;br&amp;gt;-rw-rw---- 1 MySQL MySQL 268435558 Sep 23 17:32 MySQL-bin.000471&amp;lt;br&amp;gt;-rw-rw---- 1 MySQL MySQL &amp;amp;nbsp;37425262 Sep 24 00:00 MySQL-bin.000472&amp;lt;br&amp;gt;-rw-rw---- 1 MySQL MySQL 137389819 Sep 25 00:00 MySQL-bin.000473&amp;lt;br&amp;gt;-rw-rw---- 1 MySQL MySQL 147386521 Sep 26 00:00 MySQL-bin.000474&amp;lt;br&amp;gt;我们需要的Binlog时间段为：2014-09-23 18:28:00 至 2014-09-25 21:53:56&amp;lt;br&amp;gt;因此只需要：&amp;lt;br&amp;gt;-rw-rw---- 1 MySQL MySQL &amp;amp;nbsp;37425262 Sep 24 00:00 MySQL-bin.000472&amp;lt;br&amp;gt;-rw-rw---- 1 MySQL MySQL 137389819 Sep 25 00:00 MySQL-bin.000473&amp;lt;br&amp;gt;-rw-rw---- 1 MySQL MySQL 147386521 Sep 26 00:00 MySQL-bin.000474
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576866abe7f2c233062839-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576866abe7f2c233062839-1">
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                87669492
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                23
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000469
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-i">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                268436559
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                23
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                04
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                20
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000470
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-i">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                268435558
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                23
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                17
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                32
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000471
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                37425262
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                24
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000472
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-i">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                137389819
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                25
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000473
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-i">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                147386521
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                26
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000474
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               我们需要的
               <span class="crayon-i">
                Binlog
               </span>
               时间段为：
               <span class="crayon-cn">
                2014
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-cn">
                09
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-cn">
                23
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                18
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                28
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-h">
               </span>
               至
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                2014
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-cn">
                09
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-cn">
                25
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                21
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                53
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                56
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               因此只需要：
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                37425262
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                24
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000472
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-i">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                137389819
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                25
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000473
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                rw
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                MySQL
               </span>
               <span class="crayon-i">
                MySQL
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                147386521
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Sep
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                26
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                00
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000474
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0481 seconds] -->
       <p>
        将这3个Binlog  Copy过去：
       </p>
       <blockquote>
        <p>
         SCP MySQL-bin.000472 &lt;恢复测试机IP&gt;:/data/opdir/20140926
         <br/>
         SCP MySQL-bin.000473 &lt;恢复测试机IP&gt;:/data/opdir/20140926
         <br/>
         SCP MySQL-bin.000474 &lt;恢复测试机IP&gt;:/data/opdir/20140926
        </p>
       </blockquote>
       <p>
        5.使用MySQLBinlog 生成SQL脚本：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576866abe7f33465216867" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          MySQLBinlog --database=[db_name] --start-datetime='2014-09-23 18:19:12' --stop-datetime='2014-09-25 21:53:56'&amp;amp;nbsp;&amp;lt;br&amp;gt;MySQL-bin.000472 &amp;gt; 472.SQL&amp;lt;br&amp;gt;MySQLBinlog --database=[db_name] --start-datetime='2014-09-23 18:19:12' --stop-datetime='2014-09-25 21:53:56'&amp;amp;nbsp;&amp;lt;br&amp;gt;MySQL-bin.000473 &amp;gt; 473.SQL&amp;lt;br&amp;gt;MySQLBinlog --database=[db_name] --start-datetime='2014-09-23 18:19:12' --stop-datetime='2014-09-25 21:53:56'&amp;amp;nbsp;&amp;lt;br&amp;gt;MySQL-bin.000474 &amp;gt; 474SQL
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576866abe7f33465216867-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576866abe7f33465216867-1">
               <span class="crayon-v">
                MySQLBinlog
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                database
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-v">
                db_name
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                datetime
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '2014-09-23 18:19:12'
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                stop
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                datetime
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '2014-09-25 21:53:56'
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000472
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                472.SQL
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                MySQLBinlog
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                database
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-v">
                db_name
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                datetime
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '2014-09-23 18:19:12'
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                stop
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                datetime
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '2014-09-25 21:53:56'
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000473
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                473.SQL
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                MySQLBinlog
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                database
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-v">
                db_name
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                datetime
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '2014-09-23 18:19:12'
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                stop
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                datetime
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '2014-09-25 21:53:56'
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                000474
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                474SQL
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0144 seconds] -->
       <p>
        6.Binlog生成的SQL脚本导入：
       </p>
       <p>
        待20140923.db_name导入到恢复测试库之后，将MySQLBinlog生成的SQL脚本导入到数据库中：
       </p>
       <blockquote>
        <p>
         MySQL -uroot -pxxxxxx -S /tmp/MySQL.sock db_name &lt; 472.SQL
         <br/>
         MySQL -uroot -pxxxxxx -S /tmp/MySQL.sock db_name &lt; 473.SQL
         <br/>
         MySQL -uroot -pxxxxxx -S /tmp/MySQL.sock db_name &lt; 474.SQL
        </p>
       </blockquote>
       <p>
        7.导入完成后检查数据正确性：
       </p>
       <p>
        大致看一下数据的情况，然后可以通过时间字段来看一下情况：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576866abe7f3a646391470" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          MySQL&amp;gt; select max(createtime),max(updatetime) from table_name;&amp;lt;br&amp;gt;+-----------------+-----------------+&amp;lt;br&amp;gt;| max(createtime) | max(updatetime) |&amp;lt;br&amp;gt;+-----------------+-----------------+&amp;lt;br&amp;gt;| &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;1411648043 | &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;1411648043 |&amp;lt;br&amp;gt;+-----------------+-----------------+&amp;lt;br&amp;gt;1 row in set (0.00 sec)
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576866abe7f3a646391470-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576866abe7f3a646391470-1">
               <span class="crayon-v">
                MySQL
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                select
               </span>
               <span class="crayon-e">
                max
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                createtime
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-e">
                max
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                updatetime
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                from
               </span>
               <span class="crayon-v">
                table_name
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                max
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                createtime
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                max
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                updatetime
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                1411648043
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                nbsp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                1411648043
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                br
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                row
               </span>
               <span class="crayon-st">
                in
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                0.00
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sec
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0230 seconds] -->
       <p>
        时间差不多为 晚上20:27了
       </p>
       <p>
        这个判断，作为DBA，查看部分数据，只能起到辅助作用，具体的需要 到底是否OK，需要业务开发的人来判断。
       </p>
       <p>
        经过业务开发确认后，即可将该数据导出后，再导入到线上主库中。
       </p>
       <p>
        8、将该库导出，并压缩：
       </p>
       <blockquote>
        <p>
         MySQLdump -uroot -pxxxxxx -S /tmp/MySQL.sock -q db_name table_name &gt; table_name.SQL
        </p>
       </blockquote>
       <p>
        压缩：
       </p>
       <blockquote>
        <p>
         gzip table_name.SQL
        </p>
       </blockquote>
       <p>
        SCP 到主库 （复制的时候，请将网络因素考虑进去，确认不会占用过多带宽而影响其他线上业务）
       </p>
       <p>
        9.恢复测试的数据导入到线上主库中：
       </p>
       <p>
        线上主库操作：
       </p>
       <p>
        操作之前，最好让开发把应用业务那段先暂停，否则可能会影响导入。比如这个表示MyISAM的，应用那边如果不听有update进来，就会阻塞数据导入。
       </p>
       <p>
        a、主库将原始被篡改的表改名：（不要上来就drop，先rename，后续确认没问题了再考虑drop，因为很多问题不是一瞬间就能全部反映上来的）
       </p>
       <blockquote>
        <p>
         rename table_name to old_table_name;
        </p>
       </blockquote>
       <p>
        b、解压：
       </p>
       <blockquote>
        <p>
         gunzip table_name.SQL.gz
        </p>
       </blockquote>
       <p>
        c、导入新表数据：
       </p>
       <blockquote>
        <p>
         MySQL -uroot -pxxxxxx -S /tmp/MySQL.sock db_name &lt; table_name.SQL
        </p>
       </blockquote>
       <p>
        后面就需要开发来进一步验证数据是否 OK 了。 验证没问题后，再启动应用程序。
       </p>
       <p>
       </p>
       <p>
        文章出处：CSDN
       </p>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/20517.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/07/t012366e61c52d9046b-300x228.png"/>
        </a>
        <a class="link" href="http://dataunion.org/20517.html" rel="bookmark" title="MySQL索引背后的数据结构及算法原理">
         MySQL索引背后的数据结构及算法原理
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20229.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/07/t012366e61c52d9046b-300x228.png"/>
        </a>
        <a class="link" href="http://dataunion.org/20229.html" rel="bookmark" title="8 个不得不说的 MySQL 陷阱">
         8 个不得不说的 MySQL 陷阱
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20094.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/07/t012366e61c52d9046b-300x228.png"/>
        </a>
        <a class="link" href="http://dataunion.org/20094.html" rel="bookmark" title="老叶观点：MySQL开发规范之我见">
         老叶观点：MySQL开发规范之我见
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/19973.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/06/u1068384158883784220fm21gp0.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/19973.html" rel="bookmark" title="MySQL 调优/优化的 100 个建议">
         MySQL 调优/优化的 100 个建议
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F4825.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/4825.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/4825.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>